<template>
  <div class="device AcdMachine padding_16">
    <van-row class="van-hairline--bottom text_align_center overflow_hidden">
      <van-col :span="24">
        <img
          :src="deviceObj.fileName"
          class="width_70 height_70 object_fit_cover border_radius_8"
        />
      </van-col>
      <van-col :span="24">
        <p class="margin_bottom_8 font_size_16">
          <b>{{ deviceObj.equipmentName }}</b>
        </p>
        <p>
          <van-button size="small" @click="getState">获取状态</van-button>
          <van-button size="small" class="margin_left_16" @click="refreshFn"
            >刷新</van-button
          >
        </p>
      </van-col>
    </van-row>
    <van-row gutter="10" class="margin_top_8 font_size_14">
      <van-col :span="12" class="margin_top_8"
        ><p
          class="bg_10b928 color_FFF padding_4 border_radius_4 line_height_1 van-ellipsis"
        >
          是否在线:{{ deviceObj.equipmentStatusText }}
        </p></van-col
      >
      <van-col :span="12" class="margin_top_8"
        ><p
          class="bg_10b928 color_FFF padding_4 border_radius_4 line_height_1 van-ellipsis"
        >
          设备状态：{{ deviceObj.onOffText }}
        </p></van-col
      >
      <van-col
        class="margin_top_8"
        :span="12"
        v-for="(item, parameterArrIndex) in deviceObj.parameterArr"
        :key="parameterArrIndex"
        ><p
          class="bg_10b928 color_FFF padding_4 border_radius_4 line_height_1 van-ellipsis"
        >
          {{ item.description }}：{{ item.defaultValue }}
        </p></van-col
      >
    </van-row>
    <van-row
      type="flex"
      justify="start"
      align="center"
      class="margin_top_16 font_size_14"
    >
      <van-col :span="8">
        重启控制：
      </van-col>
      <van-col :span="16" class="text_align_right">
        <van-button size="small" @click="setRestart">重启</van-button>
      </van-col>
    </van-row>
  </div>
</template>

<script src="./AcdMachine.js" />
